﻿using System;
using System.Runtime.Serialization;

namespace MedicalAdviser.Portable.DataTypes.WsTypes
{

    [DataContract]
    public enum OauthProvider
    {
        [EnumMember]    NoOne  =    0,
        [EnumMember]    Google =    1,
        [EnumMember]    Microsoft = 2,
        [EnumMember]    Facebook=   3,
        [EnumMember]    Twitter =   4
    }

    [DataContract]
    public enum AuthenticationAction
    {
        [EnumMember]    Default  = 0,
        [EnumMember]    Login  = 1,
        [EnumMember]    Logout = 2,
        [EnumMember]    MessageAuthentication = 3
    }

    /// <summary>
    /// Classe usada pra authenticar o utilizador no servico, em varias fases;
    /// </summary>
    [DataContract]
    public class Auth
    {
        [DataMember]
        public String           AccessToken  {  get; set;}
        [DataMember]
        public String           App { get; set; }
        [DataMember]
        public OauthProvider    Type { get; set; }
        [DataMember]
        public AuthenticationAction Operation { get; set; } 

    }
}
